﻿<%-- 
     Dit is de index pagina van de website hier wordt het eerst volgende evenement getoond
     Deze pagina maakt gebruik van een accordeon overview
--%>


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="groep20_festival.index" MasterPageFile="~/festival.Master" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%-- Stijl van de accordeon componenten --%>
<asp:Content ID="Content3" ContentPlaceHolderID="main" runat="server">
    <style type="text/css">
        .accordionHeader {
            color: white;
            background-color: #719DDB;
            font: bold 11px auto "Trebuchet MS", Verdana;
            font-size: 12px;
            cursor: pointer;
            padding: 4px;
            margin-top: 3px;
        }

        .accordionContent {
            background-color: #FFFFFF;
            font: normal 10px auto Verdana, Arial;
            border: 1px gray;
            padding: 4px;
            padding-top: 7px;
        }
    </style>
    <%-- Ajax control accordeon voor de weergave van de home pagina --%>

    <asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server" />

    <asp:Accordion ID="Accordion1" runat="server" HeaderCssClass="accordionHeader"
        ContentCssClass="accordionContent" Height="285px" Width="527px">
        <Panes>
            <%-- eerste panel binnen het accordeon component --%>
            <asp:AccordionPane ID="AccordionPane1" runat="server" ContentCssClass="" HeaderCssClass="">
                <Header>Algemene info</Header>
                <Content>
                    <%-- autogerneratecolums=false omdat we zelf de namen van de datavelden willen specifiëren --%>
                    <asp:DetailsView ID="DetailsView" runat="server" AutoGenerateRows="False" Height="50px" Width="125px" DataSourceID="IndexDetail">
                        <Fields>
                            <asp:BoundField DataField="fest_naam" HeaderText="<%$ Resources:TestSiteResources, IndexInfoNaam %>" SortExpression="fest_naam" />
                            <asp:BoundField DataField="fest_locatie" HeaderText="<%$ Resources:TestSiteResources, IndexInfoLocatie %>" SortExpression="fest_locatie" />
                            <asp:BoundField DataField="fest_duur" HeaderText="<%$ Resources:TestSiteResources, IndexInfoDuur %>" SortExpression="fest_duur" />
                            <asp:BoundField DataField="fest_datum" HeaderText="<%$ Resources:TestSiteResources, IndexInfoDatum %>" SortExpression="fest_datum" DataFormatString="{0:MM/dd/yyyy}" />
                        </Fields>
                    </asp:DetailsView>
                    <%-- Connectie met de databank met query om de juiste data op te halen --%>

                    <asp:SqlDataSource ID="IndexDetail" runat="server" ConnectionString="<%$ ConnectionStrings:groep20_festivalsConnectionString1 %>"
                        SelectCommand="SELECT [fest_naam], [fest_locatie], [fest_duur], [fest_datum] FROM [Festivals] where 
                        [fest_ID] = (SELECT fest_id FROM ( SELECT *, ROW_NUMBER() OVER (ORDER BY fest_datum) as row FROM Festivals ) a WHERE row = 1)"></asp:SqlDataSource>
                </Content>
            </asp:AccordionPane>
            <%-- tweede panel binnen het accordeon component --%>
            <asp:AccordionPane ID="AccordionPane2" runat="server" ContentCssClass="" HeaderCssClass="">
                <Header>Line-up</Header>
                <Content>
                    <%-- autogerneratecolums=false omdat we zelf de namen van de datavelden willen specifiëren --%>
                    <asp:GridView ID="LinupGrid" runat="server" AutoGenerateColumns="False" DataSourceID="indexDetail2">
                        <Columns>
                            <asp:BoundField DataField="datum" HeaderText="<%$ Resources:TestSiteResources, IndexLineUpDatum %>" SortExpression="datum" DataFormatString="{0:MM/dd/yyyy}" />
                            <asp:BoundField DataField="uur" HeaderText="<%$ Resources:TestSiteResources, IndexLineUpUur %>" SortExpression="uur" />
                            <asp:BoundField DataField="band_naam" HeaderText="<%$ Resources:TestSiteResources, IndexLineUpBand %>" SortExpression="band_naam" />
                            <asp:BoundField DataField="pod_omschr" HeaderText="<%$ Resources:TestSiteResources, IndexLineUpPod %>" SortExpression="pod_omschr" />
                        </Columns>
                    </asp:GridView>
                    <%-- Connectie met de databank met query om de juiste data op te halen --%>
                    <asp:SqlDataSource ID="indexDetail2" runat="server" ConnectionString="<%$ ConnectionStrings:groep20_festivalsConnectionString1 %>"
                        SelectCommand="SELECT BandsPerFestival.datum, BandsPerFestival.uur, Bands.band_naam, Podia.pod_omschr, BandsPerFestival.fest_id FROM 
                               Podia INNER JOIN BandsPerFestival ON Podia.pod_id = BandsPerFestival.pod_id INNER JOIN Bands ON BandsPerFestival.band_id = Bands.band_id 
                        where [fest_ID] = (SELECT fest_id FROM ( SELECT *, ROW_NUMBER() OVER (ORDER BY fest_datum) as row FROM Festivals ) a WHERE row = 1)"></asp:SqlDataSource>

                </Content>
            </asp:AccordionPane>
            <%-- derde panel binnen het accordeon component --%>
            <asp:AccordionPane ID="AccordionPane3" runat="server" ContentCssClass="" HeaderCssClass="">
                <Header>Tickets</Header>
                <Content>
                    <%-- autogerneratecolums=false omdat we zelf de namen van de datavelden willen specifiëren --%>
                    <asp:GridView ID="TicketsGrid" runat="server" AutoGenerateColumns="False" DataSourceID="indexDetail3">
                        <Columns>
                            <asp:BoundField DataField="typ_omschr" HeaderText="<%$ Resources:TestSiteResources, IndexTicketType %>" SortExpression="typ_omschr" />
                            <asp:BoundField DataField="typ_prijs" HeaderText="<%$ Resources:TestSiteResources, IndexTicketPrijs %>" SortExpression="typ_prijs" />
                            <asp:BoundField DataField="aantal" HeaderText="<%$ Resources:TestSiteResources, IndexTicketAantal %>" SortExpression="aantal" />
                        </Columns>
                    </asp:GridView>
                    <%-- Connectie met de databank met query om de juiste data op te halen --%>

                    <asp:SqlDataSource ID="indexDetail3" runat="server" ConnectionString="<%$ ConnectionStrings:groep20_festivalsConnectionString1 %>"
                        SelectCommand="SELECT Tickettypes.typ_omschr, Tickettypes.typ_prijs, TickettypesPerFestival.aantal FROM Tickettypes INNER JOIN
                         TickettypesPerFestival ON Tickettypes.typ_id = TickettypesPerFestival.typ_id where 
                        [fest_ID] = (SELECT fest_id FROM ( SELECT *, ROW_NUMBER() OVER (ORDER BY fest_datum) as row FROM Festivals ) a WHERE row = 1)"></asp:SqlDataSource>

                </Content>
            </asp:AccordionPane>
        </Panes>
    </asp:Accordion>

</asp:Content>

<%-- 
     Author: Bart Wetzels
     Created: 23/05/2013
     Updates: invoeren accordeon
--%>